<?php
/**
 * quick_curd
 * ============================================================================
 * 版权所有 2024-2099 www.wltx666.com，并保留所有权利。
 * 网站地址: https://www.wltx666.com
 * ============================================================================
 * Author: 草上飞
 * Email: wei@alipay16.cn
 * QQ: 2719875001
 * Date: 2025/7/11
 * 描述: curd的基础类
 */

namespace app\admin\controller;

trait BaseCurd
{
   //数据列表
    public function list(): void
    {
        data_exit_json($this->objResult->list($this->param));
    }

    //获取详情
    public function get(): void
    {
        data_exit_json($this->objResult->get($this->param));
    }

    //基础配置
    public function list_config(): void
    {
        data_exit_json($this->objResult->list_config());
    }

    // 获取下拉列表
    public function list_options(): void
    {
        data_exit_json($this->objResult->list_options($this->param));
    }

    //保存数据
    public function save_data(): void
    {
        data_exit_json($this->objResult->save_data($this->param));
    }

    //删除数据
    public function del_data(): void
    {
        data_exit_json($this->objResult->del_data($this->param));
    }
}
